package com.stox.client.ui.javafx.chartingy.model.node;

import com.stox.client.ui.javafx.chartingy.model.Rectangle;
import com.stox.client.ui.javafx.chartingy.model.plot.Data;
import com.stox.client.ui.javafx.chartingy.model.plot.Plot;

public abstract class DataNode<T, V> extends ChartingNode<T, V> {
	
	private Data<T, V> data;
	private final Rectangle rectangle = new Rectangle();

	public DataNode(Data<T, V> data) {
		this.data = data;
		setManaged(false);
		setAutoSizeChildren(false);
	}
	
	public abstract void layoutChartChildren();
	
	@Override
	public Plot<T, V> getPlot() {
		return data.getPlot();
	}
	
	public Data<T, V> getData() {
		return data;
	}
	
	public Rectangle getRectangle() {
		return rectangle;
	}
}
